<template>
  <div style="height: 100%;">
    <message-list :messages="messageList"/>
  </div>
</template>

<script>
import messageList from '@/components/messageList'
import api from '@/api'
export default {
  name: 'message',
  data () {
    return {
      messageList: []
    }
  },
  methods: {
    getList () {
      api.platformMessage({
        params: {},
        callback: res => {
          if (res.data.error_code === 0) {
            this.messageList = res.data.data
          }
        }
      })
    }
  },
  components: {
    messageList
  },
  created () {
    this.getList()
  }
}
</script>

<style scoped>

</style>
